import Vue from 'vue'
import Router from 'vue-router'
import App from '@/App.vue'
import Home from '@/views/Home/home.vue'
const overview = () => import('@/views/Home/overview.vue')
const maintain = () => import('@/views/Home/maintain.vue')
const warning = () => import('@/views/Home/warning.vue')
const house = () => import('@/views/Home/house.vue')
const loss = () => import('@/views/Home/loss.vue')
const monitor = () => import('@/views/Home/monitor.vue')
const consumption = () => import('@/views/Home/consumption.vue')
// import Auto from './auto'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home',
      component: App,
      children: [
        {
          path: '/home', // 主页面 泵房总览
          components: { default: Home },
          meta: { title: '首页', fullPath: 'home.vue' },
        },
        {
          path: '/overview',
          components: { default: overview },
          meta: { title: '鹰潭市供水集团有限公司江北水厂', fullPath: 'overview.vue' },
        },
        {
          path: '/maintain',
          components: { default: maintain },
          meta: { title: '报警情况', fullPath: 'maintain.vue' },
        },
        {
          path: '/warning',
          components: { default: warning },
          meta: { title: '24h流量/压力监测', fullPath: 'warning.vue' },
        },
        {
          path: '/house',
          components: { default: house },
          meta: { title: '能耗对比 ', fullPath: 'house.vue' },
        },
        {
          path: '/loss',
          components: { default: loss },
          meta: { title: '能耗总览', fullPath: 'loss.vue' },
        },
        {
          path: '/monitor',
          components: { default: monitor },
          meta: { title: '近七天供水量分析', fullPath: 'monitor.vue' },
        },
        {
          path: '/consumption',
          components: { default: consumption },
          meta: { title: '近七天能耗', fullPath: 'consumption.vue' },
        }
      ],
    },
  ],
})
